Why Shiny

Intro














 

Shiny Site Examples

 

Below are examples of what can be done in Shiny.

 
Police and Demand Planning Tool (Click here to Open separately)

 

 

A Shiny App to visualize and share a dog’s medical history. (Click here to Open separately)
Github Code
 

 

Real estate analytics, prediction modeling and forecasting for over 20,000 U.S. real estate markets. (Click here to Open separately)
Github Code  

 

Starting to Build

Let’s get started!

Task 1: Create the folder structure in your working directory as shown below.

 

 

Task 2: Create Shiny script and load Shiny library.

 

To create your first Shiny app you have two options:

  1. Open a new script and insert the following:

library(shiny)

ui <- fluidPage()

server <- function(input, output) {}

shinyApp(ui = ui, server = server)
 

  1. While in your working directory (as created above), go to File–> New File–> Shiny Web App.This option will create a Shiny App in two scripts rather than one.

 

Task 3: Your app will be empty or will contain default code. Test Shiny works by running your app as shown below.

 

 

Checkpoint 1

App Time

 

We will gradually build an app in steps today. Follow the brief below for your first step.